//
//  ViewController.swift
//  AModule
//
//  Created by sk on 2021/10/30.
//

import UIKit

public extension DispatchQueue {
    fileprivate static var onceToke = [AnyHashable]()
    class func once(token: String = "\(#file):\(#function):\(#line)", block: () -> Void ) {
        objc_sync_enter(self)
        defer {
            objc_sync_exit(self)
        }
        if onceToke.contains(token) {
            return
        }
        onceToke.append(token)
        block()
    }
}

class ViewController: UIViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.
    }
    
    
}

